git 命令行配置及配置文件 解决clone报错 LibreSSL SSL

您所在的位置:网站首页 openssl ssl_connect: ssl_error_syscall git 命令行配置及配置文件 解决clone报错 LibreSSL SSL

git 命令行配置及配置文件 解决clone报错 LibreSSL SSL

2024-04-02 13:09| 来源: 网络整理| 查看: 265

Intro

clone 某个来自于 github 的仓库的时候,报错如下:

leung@wuyujin coderepo % git clone https://github.com/spring-guides/gs-consuming-web-service.git Cloning into 'gs-consuming-web-service'... fatal: unable to access 'https://github.com/spring-guides/gs-consuming-web-service.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 leung@wuyujin coderepo % git clone https://github.com/spring-guides/gs-consuming-web-service.git Cloning into 'gs-consuming-web-service'... fatal: unable to access 'https://github.com/spring-guides/gs-consuming-web-service.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 leung@wuyujin coderepo %

核心错误:LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

是一些SSL验证的问题。

配置

当前用户的git配置会写在当前用户目录下的.gitconfig配置文件下(如无可手动新建touch ~/.gitconfig)。 以用户wuyujin为例,git配置文件的全路径分别为: Windows:C:\Users\wuyujin\.gitconfig linux: /home/wuyujin/.gitconfig macbook: /Users/wuyujin/.gitconfig

git的配置有两种方式: 通过命令行设置,对应的配置项会自动写入到配置文件(前提:你知道命令怎么写) 直接去修改配置文件(前提:你知道配置文件的格式/规则)

所需命令:

git config --global http.sslVerify false git config --global https.sslVerify false

效果就是,配置文件会被写入以下内容:

[http] sslVerify = false [https] sslVerify = false

另外还有 user.name user.email 等参数项可设置(此处暂不必)。

shell leung@wuyujin coderepo % git config --global http.sslVerify false leung@wuyujin coderepo % git config --global https.sslVerify false leung@wuyujin coderepo % more ~/.gitconfig [http] sslVerify = false [https] sslVerify = false leung@wuyujin coderepo %

再次 clone ,成功。

另一种可能

在 clone 某个仓库的时候,新开窗口 clone 另一个窗口。报错。

一个一个clone就不会报错。

即: 并行clone --> 串行clone



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3